#pragma once

#include <QMainWindow>

#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl/visualization/pcl_visualizer.h>

namespace Ui {
class PCLViewer;
}

class PCLViewer : public QMainWindow {
  Q_OBJECT

public:
  explicit PCLViewer(QWidget *parent = 0);
  ~PCLViewer();

private:
  void initializeInteractorSwitch();

protected:
  pcl::visualization::PCLVisualizer::Ptr m_viewer;
  pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud;

private slots:
  void onUpdatePoint(pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud);
  void on_pbAddCloud_clicked();

private:
  Ui::PCLViewer *ui;

signals:
  void updatePoint(pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud);
};
